<!-- <template>
  <div class="search-bar" v-show="isShowSearchBar">我是搜索框内容</div>
</template>

<script setup>
import { ref, watch } from "vue";
import useScroll from "@/hooks/useScroll";

const { scrollTop } = useScroll()
const isShowSearchBar = ref(true)
watch(scrollTop, newTop => {
  isShowSearchBar.value = newTop > 300
})

</script>

<style lang="less" scoped>
.search-bar {
  position: fixed;
  z-index: 9;
  top: 0;
  right: 0;
  left: 0;
  background-color: #fff;
  height: 45px;
  padding: 16px 16px 10px;
}
</style> -->